import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      component: () => import('@/pages/IndexMounter'),
      children: [
        {
          path: '',
          name: 'indexPage',
          component: () => import('@/pages/IndexPage')
        },
        {
          path: 'search',
          name: 'searchPage',
          component: ()=>import('@/pages/search/SearchResourcePage')
        },
        {
          path: 'history',
          name: 'historyPage',
          component: ()=>import('@/pages/history/HistoryPage')
        },
        {
          path: 'setting',
          name: 'settingPage',
          component: ()=>import('@/pages/setting/SettingPage')
        }
      ]
    },
    {
      path: '*',
      redirect: '/'
    }
  ]
})
